<?
//根据传过来的参数，搜索相册
//keyword是关键词，plate是指定搜多场景还是模特
//t.assy.com/api/assy/search.php?keyword=宋&plate=model


include_once("base.php");

$_keyword = $_REQUEST['keyword'];

if($_REQUEST['plate']=="model")
{
    $_plate   = "product";
}
else
{
    $_plate="project";
}



//用封装的语句获取对应的数据
$_searche_result=select_lines_items($table_prefix."detail","listorder desc , nid desc","name,nid,icon","(name like '%".$_keyword."%' or introduce like '%".$_keyword."%' or detail like '%".$_keyword."%') and belong = '".$_plate."' and publish = '1'","");


$result=$_searche_result;
 
//按照格式输出数据
echo out("success",0,$result);


?>